<?php
session_start();
/*verifica se est�  logado, ou seja com a Session ativa */
if (!isset($_SESSION["login"])  ||  !isset($_SESSION["senha"]) )
{
/* Se n�o tiver Session ativa redireciona para index.php */	
header("location: index.php");
	exit;}
	else
	{
	$codigo=$_SESSION["login"];
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta http-equiv="refresh" content="30;url=ws_cliente.php"> 
<title>GAL - AUTOMAÇÃO - RESULTADOS</title>
</head>
<body style="background-color:#E8E8E8; color:#FF6E00">
<div id="geral" style="background-color:#E8E8E8">
<img src="images/gal_logo.jpg" />
<div id="executando"><span id="sexec"><h1>Enviando resultados . . .</h1></span></div>
<div id="carregando" style="display:none"><img src="img/ajax-loader4.gif" /><span id="situacao"></span></div>
<?php
//ini_set('display_errors', 1);
require "config/funcoes.php";
require "admin/funcoesbd.php";
$result=enviar_resultados();
if($result[1]=='50')
echo "<script>window.setTimeout('__doPostBack',10000); </script>";
echo "<script>document.getElementById('carregando').style.display='none';";
echo "document.getElementById('situacao').innerHTML='Recebendo exames';</script>";
?>
</div>
</body>

